home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
__SELECT.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
73 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Select( xSelectArea ) --> lSelectStatus
PARAMETERS:
xSelectArea
SHORT:
Select a work area by number or alias.
DESCRIPTION:
_Select() is a general purpose work area selector. It selects a work
area either by work area ALIAS (character argument), or by work area
number (numeric argument).
Optionally, _Select() can be used to CLOSE a work are by calling
_Select() with no parameters, however, this is not recommended as it leads
to poor and evem misleading readability.
The function is useful because the way that Clipper evaluates
character expressions is different from the way it evaluates
numeric expressions. Character expressions can be evaluated, even
from character variables with no parenthesis. Numeric expressions
however must be evaluated inside parenthesis.
_Select() negates the need to determine which format to use. Simply pass
the argument to the _Select() function, and it will evaluate the
expression correctly depending upon the expression type.
_Select() returns a logical value indicating .T. if no error occured, or
.F. if an error did occur.
NOTE:
The file name is __select.prg to avoid conflict with the Clipper SELECT
command.
EXAMPLE:
SELECT 1
USE bufget INDEX budget ALIAS BudgetFile
t = "BudgetFile"
u = 1
_Select(t)
_Select(u)
_Select('BudgetFile')
Result: All three function calls accomplish the same thing. They ALL
select the Budget File work area.
SELECT 1
USE bufget INDEX budget ALIAS BudgetFile
...
...
_Select()
Result: The work area/Database File (and Indexes) is closed
******************************************************************************/